package jsu.ask.service;

import jsu.ask.dao.ManagerMapper;
import jsu.ask.pojo.Manager;

import java.util.List;

public class ManagerServiceImpl implements ManagerService{
    //service调用dao层：组合Dao
    private ManagerMapper managerMapper;

    public void setManagerMapper(ManagerMapper managerMapper) {
        this.managerMapper = managerMapper;
    }

    @Override
    public int addManager(Manager manager) {
        return managerMapper.addManager(manager);
    }

    @Override
    public int deleteManagerById(int id) {
        return managerMapper.deleteManagerById(id);
    }

    @Override
    public int updateManager(Manager manager) {
        return managerMapper.updateManager(manager);
    }

    @Override
    public Manager queryManagerById(int id) {
        return managerMapper.queryManagerById(id);
    }

    @Override
    public List<Manager> queryAllManager() {
        return managerMapper.queryAllManager();
    }

    @Override
    public Manager queryManagerByName(String mname) {
        return managerMapper.queryManagerByName(mname);
    }
}
